POV-Ray : Newsgroups : povray.general : reflection on surfaces with big bump_size : Re: reflection on surfaces with big bump_size Server Time
1 Aug 2024 08:15:04 EDT (-0400)
  Re: reflection on surfaces with big bump_size  
From: zuegs
Date: 29 Jan 2006 17:50:01
Message: <web.43dd45544d3eab55f1e9ae40@news.povray.org>
Hi Chris B

Thanks for your reply!

I see that it is difficult to define a reflection behavior that doesn't
exist in real environment. Having read some publications on this topic over
weekend I found that suggesting a perfect handling for describted condition
wouldn't be possible.
But while reviewing source-code I feeled that the "else handling" on second
condition (line 23-27 in code above) would give a better result as current
handling (line 15-19).

So i suggest to just to remove second "if" and let the "else"-code in place:
11      /* It needs fixing.  Which kind? */
23        /* Double reflect NRay using Raw_Normal */
24        /*VDot(n,New_Ray.Direction,Jitter_Raw_Normal); - kept the old n
25 around */
26        n *= -2.0;
27        VAddScaledEq(New_Ray.Direction, n, Jitter_Raw_Normal);

I meen to double reflect in every case when "New_Ray.Direction" is behind
"Jitter_Raw_Normal". So the resulting normal stays bumpy but just flips on
good side of surface. Ok, this is not the most accurate and physical
solution but it gives a much better result than just a flat reflection.

> There are probably lots of scenes that would be significanlty altered if the
> default behaviour were to be changed, but you could suggest an optional
> setting to handle this condition in the way you described.

I think, for most scenes with small bumpy there will be no significantly
change because they will rarely match condition that "New_Ray.Direction" is
behind "Jitter_Raw_Normal". One of the reason, that noone noticed this
"reflection-problem" yet.

As I was not yet able to compile pov-ray myself, i coded a simple raytracer
with current and new reflection handling. I posted a picture here:

http://www.rowen.ch/pov/povref1.jpg

On left-side is the default povray handling and at the right-side is the new
handling. Up-side without aliasing, down-side with aliasing.

As you can see, with new handling the reflection stays bumpy/blurry and
gives a more realistic result for me.

I would feel very happy if you could tell me what you think about...
.... with best regards

zuegs


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.